<div class="col-md-2 col-xs-height navshadow">
    <ul class="nav nav-sidebar" >
            <div class="image">
                <img src="<?php echo base_url("public/images/sidebar_logo.jpg"); ?>" alt="logo_image" width="150px" height="150px" class="img-circle">
                <h3>Trung tâm</h3>
            </div>
            <?php
            foreach ($typeCenters as $value) {
                ?>
                <li class="<?php if ($idType == $value['id_type_center']) echo 'center-active' ?>"><a href="<?php echo base_url('index.php/website/article/type/' . $value['id_type_center']); ?>" ><?php echo $value['name_type']; ?></a>

                    <?php
                }
                ?>

        </ul>
    </div>
<div class="col-md-10 col-xs-height"> 
    <div class=" row" id="headbar" style="margin-top: 1%; margin-bottom: 1%;">
        <div class="col-md-7">
            <div class="breadcrumbs" style=" margin: 0;">
              <ul>
                  <li><a href="<?php echo base_url("index.php/website/home");?>"><span class="glyphicon glyphicon-home"></span> Trang chủ</a></li>
                  <li><a href="<?php echo base_url("index.php/website/article");?>"><span class="glyphicon glyphicon-file"></span> Tin Tức</a></li>
              </ul>
            </div>            
        </div>
        <div class="col-md-5">
            <div class="navbar-right" style="height: 34px;">
                <?php echo $link; ?>
            </div>
        </div>
    </div>
            <div class="highlight">
            <?php if ($article == NULL):?>
                <div class="panel panel-body myshadow" style="margin-bottom: 0px;">
                <p><?=$message_notfound?></p>
            </div>
            <?php else :?>
                <?php foreach ($article as $row):

                    //han che do dai
                    if (strlen($row['title']) > 60) {
                        $title = substr($row['title'], 0, 60);

                        $row['title'] = substr($title, 0, strrpos($title, ' ')) . ' ...';
                    }
                    if (strlen($row['source']) > 350) {
                        $source = substr($row['source'], 0, 350);
                        $row['source'] = substr($source, 0, strrpos($source, ' ')) . ' ...';
                    }
                ?>
                    <div class="panel panel-body myshadow">
                        <div class="row">
                            <h3><a href="<?=base_url('index.php/website/article/id/'.$row['id_article']);?>"><?=$row['title']?></a></h3>
                            <p class="text-muted" style="font-size: 12px;">Ngày đăng: <?=date('H:i d/m/Y', strtotime($row['date']));?> Luot Xem: <?=$row['view']?> </p>
                            <hr>
                        </div>
                        <div class="row">
                            <div class="col-md-1">
                              <a href="#"><img src="
                              <?php   if (!file_exists($row['url_image'])){
                                        if ($row['id_sex'] == 1){
                                          $row['url_image'] = 'public/images/defaut_user/default-user.jpg';
                                        }else{
                                            $row['url_image'] = 'public/images/defaut_user/default-user-female.jpg';
                                        }
                                      } 
                                      echo base_url($row['url_image']);
                              ?>" class="avatar"></a>
                            </div>
                            <div class="col-md-11">
                              <p class="name"><?=$row['first_name'].' '.$row['last_name']?></p>
                              <!--<p class="company">HCM University of Technology</p>-->
                              <p class="email"><?=$row['email'];?></p>

                            </div>

                        </div>
                        <hr>
                        <div class="row content">
                            <p>
                                <?=$row['source'];?>
                            </p>
                        </div>
                    </div>
                <?php endforeach;?>
            <?php endif;?>
        </div>
    </div>